//
//  iBacchanal.m
//  PartyAnimal
//
//  Created by Hilary Muludiang on 4/5/12.
//  Copyright 2012 Muludiang. All rights reserved.
//

#import "iBacchanal.h"

static iBacchanal *sharedUser = nil;

@implementation iBacchanal

@synthesize networkUp;
@synthesize stackmobLoaded;
@synthesize upMessage;
@synthesize downMessage;

@synthesize carnivalsData;
@synthesize carnivalID;
@synthesize selectedCity;
@synthesize selectedYear;
@synthesize selectedYearMonth;
@synthesize selectedView;
@synthesize carnivalDate;

@synthesize masBandsData;
@synthesize masBandID;
@synthesize masBandSectionID;

@synthesize eventsData;
@synthesize eventID;
@synthesize eventFlyersArray;
@synthesize flyerSideOne, flyerSideTwo;
@synthesize eventName;
@synthesize eventSubmitter;

@synthesize currentUser;

@synthesize loggedIn;

@synthesize dataChanged;

@synthesize adBanner;
@synthesize adBannerIsVisible;
@synthesize bannerViewController;

+ (iBacchanal *)sharedUser {
	if(sharedUser == nil){
		sharedUser = [[super allocWithZone:NULL] init];
	}
	return sharedUser;
}

+ (id)allocWithZone:(NSZone *)zone {
	return [[self sharedUser] retain];	
}

// Helper functions to get height of banner
- (int)getBannerHeight:(UIDeviceOrientation)orientation {
    if (UIInterfaceOrientationIsLandscape(orientation)) {
        return 32;
    } else {
        return 50;
    }
}

- (int)getBannerHeight {
    return [self getBannerHeight:[UIDevice currentDevice].orientation];
}


-(id)init{
	@synchronized(self) {
		[super init];
upMessage = @"Internet connectivity has been restored";
downMessage = @"A connection to the Internet is not available. Please try again later.";		
		return self;
	}
}

- (id)copyWithZone:(NSZone *)zone {
	return self;
}

- (id)retain {
	return self;
}

- (unsigned)retainCount {
	return NSUIntegerMax;
}

- (void)release {
	//do nothing
}

- (id)autorelease {
	return self;
}

@end
